mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Added a not to the Images API ref field
refs https://github.com/TryGhost/Ghost/pull/10534 - The original PR has no explanation around the purpose of the ref field and it's easy to forget without knowing a wider context. Documented it to remember next time we come around working on this part of the codebase!
This commit is contained in:
parent
ca2c9b92cd
commit
d89b8448ab
@ -8,6 +8,10 @@ module.exports = {
|
||||
return frame.response = {
|
||||
images: [{
|
||||
url: mapper.mapImage(path),
|
||||
// NOTE: ref field is here to have reference point on the client
|
||||
// for example when substituting existing images in the mobiledoc
|
||||
// this field would serve as an identifier to find images to replace
|
||||
// once the response is back. Think of it as ID on the client's side.
|
||||
ref: frame.data.ref || null
|
||||
}]
|
||||
};
|
||||
|
@ -8,6 +8,10 @@ module.exports = {
|
||||
return frame.response = {
|
||||
images: [{
|
||||
url: mapper.mapImage(path),
|
||||
// NOTE: ref field is here to have reference point on the client
|
||||
// for example when substituting existing images in the mobiledoc
|
||||
// this field would serve as an identifier to find images to replace
|
||||
// once the response is back. Think of it as ID on the client's side.
|
||||
ref: frame.data.ref || null
|
||||
}]
|
||||
};
|
||||
|
@ -8,6 +8,10 @@ module.exports = {
|
||||
return frame.response = {
|
||||
images: [{
|
||||
url: mapper.mapImage(path),
|
||||
// NOTE: ref field is here to have reference point on the client
|
||||
// for example when substituting existing images in the mobiledoc
|
||||
// this field would serve as an identifier to find images to replace
|
||||
// once the response is back. Think of it as ID on the client's side.
|
||||
ref: frame.data.ref || null
|
||||
}]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user